home *** CD-ROM | disk | FTP | other *** search
- A mod for party info.
- Wolverine #1 @8130
- Mon Dec 09 03:26:44 1991
- 7[ 1Message Status 7]: 4Reply is optional
- 1«3≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡1»
- ┌────────────────────────────────────────────────────────────────────────────┐
- │ Mod Name: WOLVRNE2.MOD Mod Author: Wolverine 1@8130 │
- │ Difficulty: Easy Date: December 1, 1991 │
- │ WWIV Version: v4.20, and others │
- │ Description: A better //PARTY mod, with more capabilities!!! │
- │ │
- └────────────────────────────────────────────────────────────────────────────┘
-
- I originally found a variation of this mod, called the Fool Mod, written
- by Dude(1@13120). It was a good mod, but it can really piss off some users,
- and also that users or specific people couldn't edit the PARTY.MSG file.
- That's where I come in... I have used his base code to give me the beginning
- and from there I have added in some nicer features. First, it can be sysop
- selectable for what security level can add to the party message. Second, it
- allows users to use the WWIV colors.
-
- Step .5 As Normal!!!
- =====================
-
- 6 BACKUP YOUR BLOODY SOURCE!!!!
- If you don't know how then learn how quickly...
-
- For L'Harc v2.11: lha u a:source.lzh c:\source\*.*
-
-
- Step 1: FCNS.H
- ===============
-
- Under the BBSUTL.C section in FCNS.H file, add the following declaration:
-
- int checkcomp(char *s);
- void party();
-
- Step 2: BBSUTL.C
- =================
-
- Add the following void right after int checkcomp(char *s)....
-
- void party()
- {
- int i,i1,f;
- char s[81],l[11][81];
-
- pl("Now for a Current Party Report!!!");
- nl(); nl();
- printfile("PARTY.MSG");
- printfile("PARTY1.MSG");
- nl();
- if thisuser.sl<30 /* Change to whatever you would want */
- prt(5,"Would you like to add to the party report? ");
- if(yn()) {
- outchr(12);
- nl();
- pl("Enter your report, you have 20 lines and 70 char. per line:");
- nl();
- for (i=0; i<20; i++) {
- npr("%d=>",i+1);
- inli(&(l[i][0]),s,71,1);
- strcat(&(l[i][0]),"\r\n");
- }
- nl();
- ansic(1);
- prt(5,"Will this work? ");
- if (yn()) {
- save_status();
- sprintf(s,"%sPARTY1.MSG",syscfg.gfilesdir);
- f=open(s,O_RDWR | O_BINARY | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
- strcpy(s,nam(&thisuser,usernum));
- strcat(s,"\r\n");
- write(f,(void *)s,strlen(s));
- for (i=0; i<21; i++)
- write(f,(void *)&(l[i][0]),strlen(&(l[i][0])));
- sysoplog("Changed Party Report");
- for (i=0; i<21; i++) {
- strcpy(s," ");
- l[i][strlen(&(l[i][0]))-2]=0;
- strcat(s,&(l[i][0]));
- sysoplog(s);
- }
- nl();
- pl("Saving...");
- nl();
- close(f);
- }
- }
- }
-
- Step 3: BBS.C
- ==============
-
- Now go down to void mainmenu(...), and search down until you find:
-
- if (strcmp(s,"CLS")==0)
- outstr("\x0c");
-
- then add in the following lines:
-
- if (strcmp(s,"PARTY")==0)
- party();
-
- Step 4: LILO.C (Or UTILITY.C, for 4.12 and down, I think)
- ==========================================================
-
- Go down to void logon(...), and search down until you find:
-
- if (live_user)
- read_automessage();
-
- then add the following lines if you would like:
-
- nl(); nl();
- pl("If you need a party report, then type //PARTY at the main prompt.");
- nl();
-
- Step 5: The End!
- =================
-
- Now all you need to do is type "make" from the dos prompt, or however you may
- do it, and sit back and grab a drink. Also add the "//PARTY" command to the
- main menu. If you like the mod, then let me know, and if you can find a way
- to make it better, then let me know, because I would really like to get to
- know C and it's functions better than I do now.
-
-
- Standard Disclaimer:
- ====================
-
- If it doesn't work for you, then you should've backed up your source, so
- don't blame me! I am pretty new at this, so don't be too mad that I stole some
- code here and there, at least I am trying to give credit where credit is due.
-
- Thanks to Dude(1@13120), and to Wayne Bell for helping me to understand
- that not all good programmers work inline!
-
-
- Wolverine 1@8130 WWIVNet & User #12 on Awesome's Place(WWIVLink)
- Madripoor Island BBS - (801)393-5701 - Supporting the IBM & Amiga
- 9
- 9
- 8C├─ Madripoor Island BBS ┼ WWIVNet @8130 ┼A
- 7C Supporting IBM & Amiga Files ┤
- C└ (801)393-5701 ┘
- 6